import { SYSTEM } from '../api'
import { METHOD, request } from '@/utils/request'

/* 参数相关 */
// 新增
export async function addConfig(params) {
    return request(`${SYSTEM}/config/save`, METHOD.POST, params)
}
// 删除
export async function delConfig(params) {
    return request(`${SYSTEM}/config/del`, METHOD.POST, params)
}
// 修改
export async function updateConfig(params) {
    return request(`${SYSTEM}/config/update`, METHOD.POST, params)
}
// 查询列表
export async function getConfigList(params) {
    return request(`${SYSTEM}/config/page`, METHOD.POST, params)
}
// 查询所有
export async function getAllConfig() {
    return request(`${SYSTEM}/config/init`, METHOD.POST, {})
}

export default {
    addConfig,
    delConfig,
    updateConfig,
    getConfigList,
    getAllConfig
}